You think, Spongebob is a kids show? It's not. It's the outcome of it's extreme dark message wrapped and hide by cartoon graphics and jokes.
The backstory doesn't begin with the first episode. It began in the prehistoric age ~250 million years before Spongebob moved in his pineapple. The world was covered with exotic vegetation and animals which are long extinct. A sperical, giant, futoristic object slowly moved to the ground, extended three feetpads and finally landed. Many other objects followed and humanoid beings riding futoristic vehicles went out.
The creatures build buildings and over a year, a metropole was built. They constructed even more futuristical kinds of vehicles. One of them was a house-vehicle hybrid, similar like a caravan, which seems to resemble a human head. It can extend limbs when activated and shoot weapons. But one day, they all died somehow and their stuff got destroyed. Except one of the caravan things. Before the disaster, it's owner thought it's water proof and tried to make it swim. It sunk under the sea. 250 million years later, a kid dug it out of his sandbox and showed it to his parents. They selled repainted it and selled it to Squidward. One day, Patrick will find the on button, push it and very likely cause it to go on rampage.